package com.xgk.boot.module.core.mq.producer.log;

import com.xgk.boot.module.core.mq.message.log.OrderApiLogMessage;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class OrderApiLogProducer {

    @Resource
    private ApplicationContext applicationContext;

    public void sendOrderApiLog(OrderApiLogMessage order) {
        // 业务逻辑...
//        OrderApiLogMessage orderApiLogMessage = new OrderApiLogMessage();
        // 发布事件
        applicationContext.publishEvent(order);
    }
}
